package nia.chapter2.echoserver;

/**
 * @Author: jia
 * @Descirption:
 * @Date: 2018/5/16 9:10
 * @Modified By:
 */


public class ServerStarter {
    public static void main(String[] args) throws Exception {
     /*   if (args.length != 1) {
            System.err.println("Usage: " + EchoServer.class.getSimpleName() +
                " <port>"
            );
            return;
        }*/
        //设置端口值（如果端口参数的格式不正确，则抛出一个NumberFormatException）
        //int port = Integer.parseInt(args[0]);
        int port = 10102;
        //调用服务器的 start()方法
        new EchoServer(port).start();
    }
}
